home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / RTF / RichText.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  2KB  |  67 lines

  1. /* $Header: /usr/people/pcd/Src/RTF/RCS/RichText.h,v 1.1 92/11/23 12:58:49 pcd Exp Locker: pcd $
  2.  */
  3.  
  4. #ifndef _XcRichText_h
  5. #define _XcRichText_h
  6.  
  7. #include <Xm/Xm.h>
  8.  
  9. #define XcNrtf "rtf"
  10. #define XcCRtf "Rtf"
  11.  
  12. /* Class record constants */
  13.  
  14. externalref WidgetClass xcRichTextWidgetClass;
  15.  
  16. typedef struct _XcRichTextClassRec * XcRichTextWidgetClass;
  17. typedef struct _XcRichTextRec      * XcRichTextWidget;
  18.  
  19. #ifndef XcIsRichText
  20. #define XcIsRichText(w)  (XtIsSubclass (w, xcRichTextWidgetClass))
  21. #endif
  22.  
  23.  
  24. typedef struct{
  25.   int reason;
  26.   XEvent *event;
  27.   Window window;
  28.   long mark, point;
  29.   char* value;
  30. }XcRichTextCallbackStruct;
  31.  
  32. /*  Creation entry points:
  33. */
  34. #if defined(__cplusplus) || defined(c_plusplus)
  35. extern "C" {
  36. #endif
  37.  
  38.  
  39. extern Widget XcCreateRichText( Widget p, String name, ArgList args,
  40.                    Cardinal n) ;
  41.  
  42. extern char *XcRichTextGetString (Widget widget);
  43. extern long XcRichTextGetLastPosition (Widget widget);
  44. extern char *XcRichTextGetSelection (Widget widget, int strip_rtf);
  45. extern void XcRichTextSetSelection (Widget widget,
  46.                     XmTextPosition first,
  47.                     XmTextPosition last,
  48.                     Time set_time);
  49. extern void XcRichTextClearSelection (Widget widget, Time clear_time);
  50. extern Boolean XcRichTextGetSelectionPosition (Widget widget,
  51.                            XmTextPosition *left, 
  52.                            XmTextPosition *right);
  53. extern long XcRichTextXYToPos (Widget widget,
  54.                Position x, Position y);
  55. extern Boolean XcRichTextPosToXY (Widget widget,
  56.                   long pos, Position *x, Position *y);
  57.  
  58. #if defined(__cplusplus) || defined(c_plusplus)
  59. }
  60. #endif
  61.  
  62.  
  63.  
  64. #endif /* _XcRichText_h */
  65. /* DON'T ADD ANYTHING AFTER THIS #endif */
  66.  
  67.